/**
 * 
 */
package net.fdukedom.epicurus.domain.entity;

import java.util.Date;

/**
 * Implements user entity
 * @author Sergey Vishnyakov
 */
public class User {

    /**
     * User's sex is undefinied.
     */
    public static final short SEX_UNDEFINIED = 0;

    /**
     * User is male.
     */
    public static final short SEX_MALE = 1;

    /**
     * User is female.
     */
    public static final short SEX_FEMALE = 2;

    private int id = 0;
    private String name;
    private String email;
    private String password;
    private short sex = SEX_UNDEFINIED;
    private int rating = 0;
    private boolean isRoot = false;    
    private Date registred = new Date();
    

    /**
     * Default constructor. NB! Required by hibernate.     
     */
    public User() {
    }
    
    /**
     * General constructor. Sets all required data.
     *
     * @param name user name
     * @param email user email
     * @param password user password
     */
    public User(String name, String email, String password) {
        this.name = name;
        this.email = email;
        this.password = password;
    }

    /**
     * @return the email
     */
    public String getEmail() {
        return email;
    }
    /**
     * @param email the email to set
     */
    public void setEmail(String email) {
        this.email = email;
    }
    /**
     * @return the id
     */
    public int getId() {
        return id;
    }
    /**
     * @param id the id to set
     */
    public void setId(int id) {
        this.id = id;
    }
    /**
     * @return the isRoot
     */
    public boolean getIsRoot() {
        return isRoot;
    }
    /**
     * @param isRoot the isRoot to set
     */
    public void setIsRoot(boolean isRoot) {
        this.isRoot = isRoot;
    }
    /**
     * @return the name
     */
    public String getName() {
        return name;
    }
    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }
    /**
     * @return the password
     */
    public String getPassword() {
        return password;
    }
    /**
     * @param password the password to set
     */
    public void setPassword(String password) {
        this.password = password;
    }
    /**
     * @return the rating
     */
    public int getRating() {
        return rating;
    }
    /**
     * @param rating the rating to set
     */
    public void setRating(int rating) {
        this.rating = rating;
    }
    /**
     * @return the registred
     */
    public Date getRegistred() {
        return registred;
    }
    /**
     * @param registred the registred to set
     */
    public void setRegistred(Date registred) {
        this.registred = registred;
    }
    /**
     * @return the sex
     */
    public short getSex() {
        return sex;
    }
    /**
     * @param sex the sex to set
     */
    public void setSex(short sex) {
        this.sex = sex;
    }

}
